/**
 * 
 */
package model;

import java.util.ArrayList;
import java.util.List;

import common.DataManager;
import common.GridCoordinate;

/**
 * @author Bill
 *
 */
public class SlowingCanon extends AutomaticWeapon {
	private static final int DEFAULT_COST = 200;
	private static final int DEFAULT_RANGE_INT = 1;
	private static final int DEFAULT_RATE = 1;
	private static final int DEFAULT_DAMAGE = 1; // damage here is the amount it is slowing by
	private static final int DEFAULT_SPEED = 5;
	
	//SmallTurret without position
	public SlowingCanon(){
		super( "Slowing Canon", DataManager.SLOWING_CANON, DataManager.SLOWING_CANON_AMMO, DEFAULT_COST, DEFAULT_DAMAGE, DEFAULT_SPEED, DEFAULT_RANGE_INT, DEFAULT_RATE );
	}
	
	//SmallTurret with position
	public SlowingCanon( GridCoordinate position){
		super( "Slowing Canon", DataManager.SLOWING_CANON, DataManager.SLOWING_CANON_AMMO, DEFAULT_COST, position, DEFAULT_DAMAGE, DEFAULT_SPEED, DEFAULT_RANGE_INT, DEFAULT_RATE );
		
		List<GridCoordinate> range = new ArrayList<GridCoordinate>();
		
		//Sets square range of 3x3
		for( int i = -1*DEFAULT_RANGE_INT; i <= DEFAULT_RANGE_INT; ++i ){
			for( int j = -1*DEFAULT_RANGE_INT; j <= DEFAULT_RANGE_INT; ++j ){
				range.add( new GridCoordinate( position.getX() + i, position.getY() + j));
			}
		}
		setRange( range );
	}

	@Override
	public void rotateCCW() {
		//Square range so it stays the same
		
	}

	@Override
	public void createRange() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String getDescription() {
		return "The Slowing Canon does not deal damage, but it's ammo freezes the zombosaurs, making them move slowly.";
	}

}
